<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 300px;
            height: 300px;
            background-color: red;
            border: 1px red solid;
            /* 边框添加图片 */
            /* 引入图片 */
            border-image-source: url("images/border.png");
            /* 设置偏移量 */
            border-image-slice: 30 30;
            border-image-width: 20px;
             /* 是否重复 */
             border-image-repeat: round;

             /* x：正数：向右移动，负数：向左移动 */
             /* y：正数：向下移动 负数：向上移动 */
             transform: translate(300px);
        }

    </style>
</head>
<body>
    <div></div>
</body>
</html>